package cn.cvs.dao;

import cn.cvs.pojo.AuctionUser;
import my.framework.dao.CommonDao;

import java.sql.SQLException;
import java.util.List;

public class AuctionUserDaoImpl  implements AuctionUserDao{

    CommonDao dao=new CommonDao();

    @Override
    public AuctionUser login(AuctionUser loginUser) throws SQLException {

        String sql ="SELECT * FROM `auctionuser`" +
                    " where 1=1" +
                    " and userName=#{userName}" +
                    " and userPassword =#{userPassword}";
        List<AuctionUser>  userlist =  dao.executeQuery(AuctionUser.class,sql,loginUser);
        return (userlist.size())>0? userlist.get(0): null;
    }


}
